<?php
require_once 'httprequestfactory.class.php';

class FakeRequestFactory extends HttpRequestFactory {
  var $requests;

  function FakeRequestFactory() {
    $this->requests = array();
  }

  function register($method, $uri, $request ) {
    $this->requests[$method . ' ' . $uri] = $request;
  }

  function make( $method, $uri ) {
    if (array_key_exists( $method . ' ' . $uri, $this->requests) ) {
      return $this->requests[$method . ' ' . $uri];
    }


    
    return new FakeHttpRequest( new HttpResponse() );
  }

}
?>